package com.wtzz.police.base.service;

import com.wtzz.police.base.entity.User;
import com.wtzz.police.base.model.response.JwtAuthenticationResponse;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Transactional
public interface AuthService  {
	JwtAuthenticationResponse login(String username, String password);
    
	JwtAuthenticationResponse refresh(String oldToken);
	
	/**
	 * 获取token用户详细信息
	 * @param token
	 * @return
	 */
	Optional<User> getUserInfo(String token);
	
}